widget: Teach query_action about property actions
authorMatthias Clasen <mclasen@redhat.com>
Sat, 22 Jun 2019 20:42:45 +0000 (20:42 +0000)
committerMatthias Clasen <mclasen@redhat.com>
Sat, 22 Jun 2019 21:04:01 +0000 (17:04 -0400)
This might be useful for documentation purposes.

gtk/gtkwidget.c
gtk/gtkwidget.h

index d1394613f6ad67d3bbb48e81c3bdeccbd43b13c5..944cf85d18cf3a79360df15f051008429131ef90 100644 (file)
@@ -13595,7 +13595,7 @@ gtk_widget_action_set_enabled (GtkWidget  *widget,
  * @owner: the type where the action was defined
  * @action_name: return location for the action name
  * @parameter_type: return location for the parameter type
- * @state_type: return location for the state type
+ * @property_name: return location for the property name
  *
  * Queries the actions that have been installed for
  * a widget class using gtk_widget_class_install_action()
@@ -13614,7 +13614,7 @@ gtk_widget_class_query_action (GtkWidgetClass      *widget_class,
                                GType               *owner,
                                const char         **action_name,
                                const GVariantType **parameter_type,
-                               const GVariantType **state_type)
+                               const char         **property_name)
 {
   GtkWidgetClassPrivate *priv = widget_class->priv;
 
@@ -13625,7 +13625,10 @@ gtk_widget_class_query_action (GtkWidgetClass      *widget_class,
       *owner = action->owner;
       *action_name = action->name;
       *parameter_type = action->parameter_type;
-      *state_type = action->state_type;
+      if (action->pspec)
+        *property_name = action->pspec->name;
+      else
+        *property_name = NULL;
 
       return TRUE;
     }
index 11ffe96a6b15743715691c0b31b22ae49821cedb..e2cec9400a17239f3d28f6f857ac4113eb40056a 100644 (file)
@@ -1055,7 +1055,7 @@ gboolean               gtk_widget_class_query_action  (GtkWidgetClass      *widg
                                                        GType               *owner,
                                                        const char         **action_name,
                                                        const GVariantType **parameter_type,
-                                                       const GVariantType **state_type);
+                                                       const char         **property_name);
 
 GDK_AVAILABLE_IN_ALL
 void                    gtk_widget_action_set_enabled (GtkWidget  *widget,